package com.cxm.helper.pojo;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 用户点赞表
 * @author chenximeng
 * @TableName user_like
 */
@Data
@TableName(value ="user_like")
public class UserLike implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 点赞的用户id
     */
    private Long userId;

    /**
     * 被点赞的文章id
     */
    private Long articleId;

    /**
     * 点赞状态，1点赞, 0取消
     */
    @TableField(fill = FieldFill.INSERT)
    private Integer likeStatus;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public UserLike(Long userId, Long articleId, Integer likeStatus) {
        this.userId = userId;
        this.articleId = articleId;
        this.likeStatus = likeStatus;
    }
}